<?php
namespace Home\Model;
use \Think\Model;

class MemberModel extends Model{
	
	//自动验证
	protected $_validate = array(
		array('username','require','用户名不能为空'),
		array('username','','用户名已存在',0,'unique'),
		array('email','email','邮箱格式不正确'),
		array('password','6,12','密码长度不合理',0,'length'),
		array('repassword','password','密码不一致',1,'confirm'),
	);

	//自动完成
	protected $_auto = array (
		array('is_used','1'),
		array('password','md5',3,'function'),
	);

}